# 使用正则，匹配字符串中所有的数字
# import re
#
# str = "hell0,1my334 5 6name is cendy"
#
# result = re.findall("\d", str)
# print(result)


# 使用正则，匹配字符串中所有的非数字
import re

str = "hell0,1my334 5 6name is cendy"

result = re.findall("\D", str)
print(result)

# 使用正则匹配换页符
# import re
#
# # 这里用chr将ASCII表中换页符转换成字符
# str = "hell0,1my334 5 6name is cendy&" +chr(12)
#
# result = re.findall("\f", str)
# print(result)


# 使用正则，匹配换行符
# import re
#
# str = "hell0,1my334 5 6name is cendy&" + chr(10)
#
# result = re.findall("\n", str)
# print(result)


# 使用正则，匹配回车符
# import re
#
# str = "hell0,1my334 5 6name is cendy&" + chr(13)
#
# result = re.findall("\r", str)
# print(result)
